//
//  ChatViewController.m
//  OneToOneChat
//
//  Created by 葱花思鸡蛋 on 2017/2/8.
//  Copyright © 2017年 葱花思鸡蛋. All rights reserved.
//

#import "ChatViewController.h"

@interface ChatViewController ()

@property (weak, nonatomic) IBOutlet UITextField *contactP;

@end

@implementation ChatViewController

@synthesize conversation = _conversation;

- (void)viewDidLoad {
    [super viewDidLoad];

    self.title = [NSString stringWithFormat:@"用户：%@",self.username];
//    NSString *s = [[EMClient sharedClient] version];
//    NSLog(@"s---------%@", s);
}
- (IBAction)startSoundCall:(id)sender {
    
//    dispatch_async(dispatch_get_global_queue(0, 0), ^{
    
        [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_CALL object:@{@"chatter":self.contactP.text, @"type":[NSNumber numberWithInt:0]}];

//    });
    
//    [self popoverPresentationController];
}




- (IBAction)startChat:(id)sender {
    
    NSLog(@"-conversationId=%zd",self.conversation.conversationId);
    

    
   [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_CALL object:@{@"chatter":self.contactP.text, @"type":[NSNumber numberWithInt:1]}];
    
}



@end
